package com.gdqy.FCS.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gdqy.FCS.dao.CommentDao;
import com.gdqy.FCS.entity.Comment;

@Service
@Transactional
public class CommentService {
	@Autowired
	private CommentDao commentDao;
	
	//通过评论类型跟评论的id获取数据
	public List<Comment> selectByObj_idAndType(int object_id,String object_type){
	return commentDao.selectByObj_idAndType(object_id, object_type);
	}
	
	public int insert(Comment comment){
		return commentDao.insert(comment);
	}
	
	public List<Comment> selectByObj_idAndTypeByTime(int object_id,String object_type){
		return commentDao.selectByObj_idAndTypeByTime(object_id, object_type);
		}
}
